package com.atguigu.servlet;

import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;

public class Servlet01HelloWorld extends HttpServlet {

    @Override
    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("HelloWorld!重大里程碑：Servlet方法执行了！");

        response.setContentType("text/html;charset=UTF-8");
        response.getWriter().write("HelloWorld!重大里程碑：Servlet方法执行了！");
    }
}
